Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove invalid legend tag for w3c validator happiness #53

Conversation

jmjf
Copy link
Contributor

@jmjf jmjf commented Apr 7, 2013

NOTE: This replaces #48 and is more complete.

The html legend tag is only valid inside a fieldset tag (http://www.w3.org/TR/html-markup/legend.html).

In the-bootstrap, the legend tag was used outside a fieldset to style "Leave a Reply" on the comment form. I added a legend class style to style.css (and style.min.css) and changed functions.php to write a span with the class.

The legend tag was also used outside a fieldset to style the "password required" text for a password protected post. I changed functions.php to put the text in a p before (correction as I'm writing the pull: inside) the form styled with class post-password-legend and modified style.css (and style.min.css) to replace .post-password-form legend with post-password-legend. According to W3C, the p tag is allowed in forms. ("A form can contain text and markup (paragraphs, lists, etc.) in addition to form controls." in section http://www.w3.org/TR/html401/interact/forms.html#edef-FORM -- I tried a span but it wouldn't take margin properly.)

Tested on localhost and styled to match existing the-bootstrap appearance.

The html legend tag is only valid inside a fieldset tag
(http://www.w3.org/TR/html-markup/legend.html).

In the-bootstrap, the legend tag was used outside a fieldset to style
"Leave a Reply" on the comment form. I added a legend class style to
style.css (and style.min.css) and changed functions.php to write a span
with the class.

The legend tag was also used outside a fieldset to style the "password
required" text for a password protected post. I changed functions.php to
put the text in a p before the form styled with class
post-password-legend and modified style.css (and style.min.css) to
replace .post-password-form legend with post-password-legend. According
to W3C, the p tag is allowed in forms. ("A form can contain text and
markup (paragraphs, lists, etc.) in addition to form controls." in
section http://www.w3.org/TR/html401/interact/forms.html#edef-FORM)

Tested on localhost and styled to match existing the-bootstrap
appearance.
@obenland
Copy link
Owner

obenland commented Apr 7, 2013

Fixed in aa97c02

@obenland obenland closed this Apr 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants